package com.haiertvbic.tvnow.util;

import java.lang.ref.SoftReference;
import java.util.HashMap;
import java.util.Map;
import java.util.Timer;

import android.graphics.Bitmap;
import android.view.Gravity;

public class Constant {
	public static final Boolean LOG_CONTROL_FLAG = true;// Log开关
	public static final String DEFAULT_URL = "http://cipwebsvc.haierusp.com/haier_ci_service";
	// 获得频道截图的路径
	// get channel screenshot url
	public static final String IMAGE_URL = "http://tv.haieross.com/haier_ci_service";

	// 获取频道状态码
	public static final int GET_FAVCHAS_FAIL = 100000;// 没有获取频道数据
	public static final int DB_ERROR_1 = 4006002; // 数据库错误
	public static final int DB_ERROR_2 = 4006003; // 数据库错误
	public static final int GET_FAVCHAS_SUC = 4006000; // 获取频道数据成功
	public static final int GET_FAVCHAS_SUC_2 = 4006001; // 获取频道数据成功但可能没有这么多数据
	public static final int NOT_SURE_ERROR = 4006004; // 未知错误

	// 要读取多少个频道,初始值为5；这个在请求频道时也要用到
	public static final int CHANNEL_NUMBER = 5;

	// 定时器默认30-tvwa版
	public static final int DEFAULT_TIME = 30;
	// 定时器第二次60-tvwa版
	public static final int SECOND_TIME = 60;

	/*
	 * -------------------------------------------------------------------------
	 * 以下值为李彬定义
	 */

	// Toast位置值
	public static final int TOAST_GRAVITY = Gravity.RIGHT | Gravity.BOTTOM;
	public static final int TOAST_Y_OFFSET = 50;

	// pip版所需常量
	public static String BASE_DIR;
	public static String CACHE_DIR;
	public static Timer IMAGE_TT = null;
	public static Timer PIC_TT = null;
	public static Timer PROGRESS_TT = null;
	public static Map<String, SoftReference<Bitmap>> logosCaches = new HashMap<String, SoftReference<Bitmap>>();
	// 想把第一次获取到的图片放到公共池子里，使pip动画也可以用
	public static HashMap<String, Bitmap> STORAGE = new HashMap<String, Bitmap>();
	public static String PRO_TYPE;// 电视剧的类型，用于判断是不是要跳入第三屏

}
